home *** CD-ROM | disk | FTP | other *** search
- %% xyps-r.tex from $Id: xyps-r.doc,v 2.9 1994/06/09 14:38:56 ross Exp $
- %%
- %% XY-pic ``PostScript Rotations and Scaling''.
- %% Copyright (c) 1993-1994 Ross Moore <ross@mpce.mq.edu.au>
- %%
- %% This file is part of the XY-pic package for graphs and diagrams in TeX.
- %% See the companion README and INSTALL files for further information.
- %% Copyright (c) 1991-1994 Kristoffer H. Rose <kris@diku.dk>
- %%
- %% The XY-pic package is free software; you can redistribute it and/or modify
- %% it under the terms of the GNU General Public License as published by the
- %% Free Software Foundation; either version 2 of the License, or (at your
- %% option) any later version.
- %%
- %% The XY-pic package is distributed in the hope that it will be useful, but
- %% WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
- %% or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- %% for more details.
- %%
- %% You should have received a copy of the GNU General Public License along
- %% with this package; if not, write to the Free Software Foundation, Inc.,
- %% 675 Mass Ave, Cambridge, MA 02139, USA.
- %%
- \ifx\xypsrloaded\relax \message{not reloaded}\endinput \fi
- \let\xypsrloaded=\relax \xycatcodes
- \xyrequire{rotate}
- \xyrequire{ps}
- \xycatcodes
- \xydef@\xyPSpretransform@{\xyPSrawA@{\preXYtransform@@}}
- \xydef@\xyPSposttransform@{\xyPSrawZ@{\postXYtransform@@}}
- \xyPSalternative@{\preXYtransform@}{pretransform}
- \xyPSalternative@{\postXYtransform@}{posttransform}
- \xydef@\xyPSscale@#1#2{%
- \xyPSsplitPS@{\xyscale@start(#1,#2)}{\xyscale@end}\xyPSpsxy@
- }
- \xydef@\xyscale@start(#1,#2){xyXpos xyYpos 2 copy translate
- #1\space#2\space scale neg exch neg exch translate }
- \xydef@\xyscale@end{}
- \xyPSalternative@{\xyscale@@}{scale}
- \xydef@\xyrot@start(#1){ xyXpos xyYpos 2 copy translate
- #1\space neg rotate neg exch neg exch translate }
- \xydef@\xyrot@end{}
- \xydef@\xyPSrotate@#1{%
- \xyPSsplitPS@{\xyrot@start(#1 setupDirection XYdirection 2 mul)}{}%
- \xyPSpsxy@
- }
- \xydef@\xyPSspecialRotate@#1{%
- \xyPSsplitPS@{\xyrot@start(#1)}{}\xyPSpsxy@
- }
- \xyPSalternative@{\xyRotate@@}{rotate}
- \xyPSalternative@{\xySpecialRotate@@}{specialRotate}
- \xyendinput
-